<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  </head>
  <body>
			<div class="widget-box">
       <div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
         <h5>用户个人信息维护</h5>
       </div>
       <div class="widget-content nopadding">
         <form action="/xtgl/assessuser/saveAssessUserAdd.html" method="post" class="form-horizontal" id="assessUserForm">
           <div class="control-group">
             <label class="control-label"><span style="color:red;">*</span>姓名</label>
             <div class="controls">
               <input type="text" class="span3" placeholder="User Name" name="user_nm" id="user_nm" maxlength="20">
             </div>
           </div>
           <div class="control-group">
             <label class="control-label"><span style="color:red;">*</span>邮箱</label>
             <div class="controls">
               <input type="text" class="span5" placeholder="User Email" name="user_email" id="user_email" maxlength="100">
             </div>
           </div>
           <div class="control-group">
             <label class="control-label"><span style="color:red;">*</span>手机号码</label>
             <div class="controls">
               <input type="text" class="span5" placeholder="User Phone" name="user_phone" id="user_phone" maxlength="20">
             </div>
           </div>
           <div class="control-group">
             <label class="control-label">单位名称</label>
             <div class="controls">
	              <select name="company_id" id="company_id">
	              	 <option value="" selected>No Selected</option>
	              	 <s:iterator value="companyList" id="s" >
	              		<option value="<s:property value="#s.company_id"/>"><s:property value="#s.company_name"/></option>
	              	</s:iterator>
	              </select>
               <span class="help-block">可模糊查询已维护的单位名称。无单位可不选。</span>
             </div>
           </div>
           <div class="control-group">
             <label class="control-label">部门</label>
             <div class="controls">
               <input type="text" class="span5" placeholder="Department" name="department" id="department"  maxlength="50">
             </div>
           </div>
           <div class="control-group">
             <label class="control-label">职位</label>
             <div class="controls">
               <input type="text" class="span5" placeholder="Position" name="position" id="position"  maxlength="50">
             </div>
           </div>
           <div class="control-group">
             <label class="control-label">是否被评估人</label>
						 <div class="controls">
						 		<label><s:radio list="#{'0':'是&nbsp;&nbsp;','1':'否&nbsp;&nbsp;'}" name="assessed_flg"  theme="simple"  id="assessed_flg" value="0"/></label>
			       </div>
           </div>
           <div class="modal-footer">
           	<div style="float:left;">"<span style="color:red;">*</span>"为必填项。</div>
           	<a href="#" class="btn" data-dismiss="modal" onclick="closeDialog();" >关闭</a>
           	<a href="#" id="add-event-submit" class="btn btn-primary" onclick="saveAssessUser();" >保存用户</a>
           </div>
         </form>
       </div>
		</div>
  </body>
  	<link rel="stylesheet" href="<%=request.getContextPath() %>/css/bootstrap.min.css" />
		<link rel="stylesheet" href="<%=request.getContextPath() %>/css/bootstrap-responsive.min.css" />
		<link rel="stylesheet" href="<%=request.getContextPath() %>/css/uniform.css" />
		<link rel="stylesheet" href="<%=request.getContextPath() %>/css/matrix-style.css" />
		<link rel="stylesheet" href="<%=request.getContextPath() %>/css/matrix-media.css" />
		<link rel="stylesheet"  href="<%=request.getContextPath() %>/css/select2.css" />
  	<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.min.js"></script>   	
		<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.uniform.js"></script>
		
		<link rel="stylesheet" href="<%=request.getContextPath() %>/js/validate/css/validate.css" type="text/css" media="all" />
		<script type="text/javascript" src="<%=request.getContextPath() %>/js/validate/talent-validate-all-min.js"></script>
  	<script type="text/javascript" src="<%=request.getContextPath() %>/js/lhgdialog/dialogUtilNew.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath() %>/js/lhgdialog/lhgdialog.min.js?skin=iblue"></script>
				
		<script type="text/javascript" src="<%=request.getContextPath() %>/js/matrix.form_common.js"></script>
		<script type="text/javascript" src="<%=request.getContextPath() %>/js/select2.min.js"></script>
		
		<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery/plugin/jquery.form.min.js"></script>
		<link href="<%=request.getContextPath() %>/font-awesome/css/font-awesome.css" rel="stylesheet" />
		<script type="text/javascript">
			
			jQuery(function(){
				zfValidate.vf.req.add('user_nm');
				zfValidate.vf.req.add('user_email');
				zfValidate.vf.req.add('user_phone'); 
				zfValidate.vf.email.add("user_email");
				zfValidate.vf.num.add("user_phone");
			});

			function saveAssessUser(){
				if(zfValidate.validate()){
					jQuery(".btn").attr("disabled", "disabled");
					jQuery("#assessUserForm").ajaxSubmit({
						url:"<%=request.getContextPath() %>/xtgl/assessuser/saveAssessUserAdd.html",
						type:"post",
						dataType:"json",
						success:function(data){
							alertSuccess(data,refershParent());
						}
					});
				}
			}
		</script>
</html>
